home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / f90 / pxfrename.z / pxfrename
Encoding:
Text File  |  1998-10-30  |  3.5 KB  |  82 lines

  1. PXFRENAME(3F)                                          Last changed: 1-6-98
  2.  
  3.  
  4. NNAAMMEE
  5.      PPXXFFRREENNAAMMEE - Renames a file
  6.  
  7. SSYYNNOOPPSSIISS
  8.      CCHHAARRAACCTTEERR*_n _o_l_d_n_m,, _n_e_w_n_m
  9.      IINNTTEEGGEERR _l_e_n_o_l_d,, _l_e_n_n_e_w,, _i_e_r_r_o_r
  10.      CCAALLLL PPXXFFRREENNAAMMEE((_o_l_d_n_m,, _l_e_n_o_l_d,, _n_e_w_n_m,, _l_e_n_n_e_w,, _i_e_r_r_o_r))
  11.  
  12. IIMMPPLLEEMMEENNTTAATTIIOONN
  13.      UNICOS, UNICOS/mk, and IRIX systems
  14.  
  15. SSTTAANNDDAARRDDSS
  16.      IEEE standard interface for FORTRAN 77
  17.  
  18. DDEESSCCRRIIPPTTIIOONN
  19.      On IRIX systems, this routine is in lliibbffoorrttrraann..ssoo which is linked by
  20.      default when compiling programs with the MIPSpro 7 Fortran 90 compiler
  21.      or when compiling programs with the --ccrraayylliibbss option to the MIPSpro
  22.      7.2 F77 compiler.
  23.  
  24.      The PPXXFFRREENNAAMMEE routine uses the rreennaammee() function to change the name of
  25.      a file.
  26.  
  27.      When using the CF90 compiler or MIPSpro 7 Fortran 90 compiler on
  28.      UNICOS, UNICOS/mk, or IRIX systems, all arguments must be of default
  29.      kind unless documented otherwise.  On UNICOS and UNICOS/mk, default
  30.      kind is KKIINNDD==88 for integer, real, complex, and logical arguments; on
  31.      IRIX, the default kind is KKIINNDD==44.
  32.  
  33.      The following is a list of valid arguments for this routine:
  34.  
  35.      _o_l_d_n_m     An input character variable or array element containing the
  36.                current file name.
  37.  
  38.      _l_e_n_o_l_d    An input integer variable containing the length of _o_l_d_n_m in
  39.                characters.  If _l_e_n_o_l_d is zero, all trailing blanks are
  40.                removed before calling rreennaammee.
  41.  
  42.      _n_e_w_n_m     An input character variable or array element containing the
  43.                new name of the file.
  44.  
  45.      _l_e_n_n_e_w    An input integer variable containing the length of _n_e_w_n_m in
  46.                characters.  If _l_e_n_n_e_w is zero, all trailing blanks are
  47.                removed before calling rreennaammee.
  48.  
  49.      _i_e_r_r_o_r    An output integer variable that contains zero if the
  50.                renaming of the file was successful or nonzero if the
  51.                renaming of the file was not completed.
  52.  
  53.      In addition to the errors returned by rreennaammee(2) system call, PPXXFFRREENNAAMMEE
  54.      may return the following errors:
  55.  
  56.      EEIINNVVAALL    If _l_e_n_o_l_d < 0 or _l_e_n_o_l_d > LLEENN((_o_l_d)) or _l_e_n_n_e_w < 0 or _l_e_n_n_e_w >
  57.                LLEENN((_n_e_w_f).
  58.  
  59.      EENNOOMMEEMM    If PPXXFFRREENNAAMMEE is unable to obtain memory to copy _o_l_d_n_m or
  60.                _n_e_w_n_m.
  61.  
  62. EEXXAAMMPPLLEESS
  63.           program test
  64.           character*(12) filea, fileb
  65.           integer lenfila, lenfilb,ierr
  66.           filea = 'oldname'
  67.           fileb = 'newname'
  68.           lenfila = 0
  69.           lenfilb = 0
  70.           call pxfrename(filea,lenfila,fileb,lenfilb,ierr)
  71.           if (ierr.ne.0) then
  72.               print *,'FAIL: error from pxfrename = ',ierr
  73.           else
  74.               print *,'PASS: No error from pxfrename = '
  75.           endif
  76.           end
  77.  
  78. SSEEEE AALLSSOO
  79.      _A_p_p_l_i_c_a_t_i_o_n _P_r_o_g_r_a_m_m_e_r'_s _L_i_b_r_a_r_y _R_e_f_e_r_e_n_c_e _M_a_n_u_a_l, publication SR-
  80.      2165, for the printed version of this man page.
  81.  
  82.